#include "UpdateScoreInternalEvent.h"
#include "ScoreModel.h"

UpdateScoreInternalEvent::UpdateScoreInternalEvent(int playerId, ScoreType scoreType, int data)
    : playerId(playerId), scoreType(scoreType), data(data)
{
}

UpdateScoreInternalEvent::~UpdateScoreInternalEvent()
{
}

void UpdateScoreInternalEvent::visitScoreModel(ScoreModel* scoreModel) const
{
    switch (scoreType)
    {
    case FULL_ROW:
        return scoreModel->fullRows(playerId, data);

    case NEW_ROW:
        return scoreModel->newRow(playerId);

    case PIECE_DOWN:
        return scoreModel->pieceDown(playerId);

    default:
        return;
    }
}
